# sdk version
from aip import AipOcr

from dotenv import load_dotenv
load_dotenv()

import os
api_key = os.getenv('API_KEY')
security_key=os.getenv('SECRET_KEY')
app_id = os.getenv('APP_ID')

client = AipOcr(app_id,api_key,security_key)
image = open('./cover.jpg', 'rb').read()
res = client.basicGeneral(image)
words_result = res['words_result']
for item in words_result:
    print(item['words'])